home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 12 / CU Amiga Magazine's Super CD-ROM 12 (1997)(EMAP Images)(GB)[!][issue 1997-07].iso / QuarterBack / Quarterback / Macros / Multiple Backups < prev    next >
Text File  |  1993-11-30  |  2KB  |  65 lines

  1. /* Backup multiple volumes to tape */
  2.  
  3. /* This macro assumes that the Backup Options */
  4. /* DisplayOptionsOn/Off flag is ON if the      */
  5. /* user wants the Backup Options to appear     */
  6. /* before the backup begins, and is OFF if     */
  7. /* user does not want the Backup Options to    */
  8. /* appear before the backup begins.  When OFF */
  9. /* the options in Backup Options must be set  */
  10. /* the way the user wants these backups to     */
  11. /* occur.                                                 */
  12.  
  13. Options Results
  14.  
  15. /* Get the volumes */
  16.  
  17. numVols = 0
  18. RC = 0
  19. Do While RC = 0
  20.     RequestText "Please enter the disk or"||"0A"x||"drawer name to backup:"
  21.     If RC = 0 Then Do
  22.         volumes.numVols = result
  23.         If Length(volumes.numVols) > 0 Then Do
  24.             If Index(volumes.numVols,":") = 0 Then
  25.                 volumes.numVols = volumes.numVols||":"
  26.             If Exists(volumes.numVols) Then
  27.                 numVols = numVols + 1
  28.             Else
  29.                 Request1 "The disk or drawer '"||volumes.numVols||"'"||"0A"x||"does not exist."
  30.         End
  31.     End
  32.     Request3 "Do you wish to backup another"||"0A"x||"disk or drawer?"
  33. End
  34.  
  35. If numVols = 0 | RC ~= 2 Then Exit
  36.  
  37. /* Ask if user wants to add session comments */
  38.  
  39. Request3 "Do you wish to add comments"||"0A"x||"to each backup session?"
  40. If RC = 1 Then Exit
  41. comments = RC
  42.  
  43. /* Backup the volumes */
  44.  
  45. SetBackupOptions Complete DisplayOptionsOff
  46.  
  47. BackupOptions
  48. If RC ~= 0 Then Exit
  49.  
  50. SetTapeOptions AutoRewindOff
  51.  
  52. Do i = 0 to numVols-1
  53.     If comments = 0 Then SetSessionInfo
  54.     Backup volumes.i
  55.     If RC ~= 0 Then Do
  56.         Request2 "An error has occurred."||"0A"x||"OK to continue with backup?"
  57.         If RC ~= 0 Then
  58.             Leave
  59.         Else
  60.             Iterate
  61.     End
  62. End
  63.  
  64. Exit
  65.